<script>

    jxt.img.newJson = function (dataJson, attrs) {
        if (!dataJson) dataJson = jxt.img.dataJson;
        var _self = jxt.tag.newJson(dataJson);
        var src;
        var url;
        if (attrs) {
            src = attrs.src;
            url = attrs.url;

        }
        if (src) {
            _self.src = src;
            if (url) _self.url = url;
        }
        else {
            _self.src = dataJson.init.src;
            _self.url = dataJson.init.url;
        }
        return _self;
    };
    /*jxt.img.editbegin = function (eleid) {
        var node = jxt.getnode(eleid);
        jxt.msg.radio(eleid, "help_imgupload", {"callbackfunction": "jxt.img.editend", "data": node});
    };*/
    jxt.img.help_callback= jxt.img.editend = function (subscribe_id, eventkey, attrs, event_source_id) {
        var eleid = subscribe_id;
        var node = jxt.getnode(eleid);
        node.src=attrs.src;
        node.url=attrs.url;
        jxt.msg.radio(eleid, "nodechange");
        jxt.render(jxt.nowlevoneid, true);
    };

    /*jxt.img.help_callback=function (subscribe_id, eventkey, attrs, event_source_id) {
        jxt.img.editend(subscribe_id, eventkey, attrs, event_source_id);
    };*/
</script>